﻿@{
    Layout = null;
}
@model System.Collections.IEnumerable
<!DOCTYPE html>
<html>
@Html.Partial("LoadPanelPartial")
<head>
<title></title> 
    @if (false)
    {
        <script src="../../Scripts/jquery-vsdoc.js" type="text/javascript"></script>
        <script src="../../Scripts/ASPxScriptIntelliSense.js" type="text/javascript"></script>
    }
    <link href="@Url.Content("~/Content/Site.css", true)" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery.min.js", true)" type="text/javascript"></script>
     <script src="@Url.Content("~/Common/GetRootPath.ashx", true)" type="text/javascript"></script>
    @Html.DevExpress().GetStyleSheets(
                new StyleSheet { ExtensionType = ExtensionType.GridView, Theme = DevExpressHelper.Theme }

)
    @Html.DevExpress().GetStyleSheets(

        new StyleSheet { ExtensionType = ExtensionType.ListBox, Theme = DevExpressHelper.Theme }
)
    @Html.DevExpress().GetScripts(
        new Script { ExtensionType = ExtensionType.ListBox }
)

    <script type="text/javascript">

        function OnBeginCallback(s, e) {
            e.customArgs["command"] = e.command;
            e.customArgs["pageIndex"] = s.pageIndex;
            e.customArgs["pageCount"] = s.pageCount;
            e.customArgs["pageRowSize"] = s.pageRowSize;
            e.customArgs["pageRowCount"] = s.pageRowCount;
            e.customArgs["FFinancePropNo"] = $("#hidFFinancePropNo").val();
        }

        function AllowanceIssueCheck(codeNo) {
            window.location.href = rootPath + '/AllowanceIssueCheck/AllowanceIssueCheckEdit?FIssueID=' + codeNo;
        }

        function MenuTop_emClick(source, e) {
            switch (e.item.name) {
                case "btnSubmit":
                    {
                        Save();
                        break;
                    }

                case "btnback":
                    {
                        window.location.href = rootPath + '/AllowanceFileManage/';
                        break;
                    }
            }

        }

        function Save() {
            var checkNo = "";
            var checkNoList = ASPxClientGridView.Cast("gvEditing").GetSelectedKeysOnPage();
            for (var i = 0; i < checkNoList.length; i++) {
                checkNo += "" + checkNoList[i] + ",";
            }
            if (checkNo != "") {
                $("#hidIssueIDList").val(checkNo);
                $("#hidFFinancePropNo").val(FFinancePropNo.GetValue());
                form1.submit();
            }
            else {
                alert("未选择任何项目！");
            }
        }

        function ValueChanged() {
            $("#hidFFinancePropNo").val(FFinancePropNo.GetValue());
            gvEditing.Refresh();
        }

    </script>
</head>
<body>
    @using (Html.BeginForm("Create", "AllowanceFileManage", FormMethod.Post, new { id = "form1" }))
    {
@Html.DevExpress().Menu(settings =>
{
    settings.Name = "toolBarMenu";
    settings.ItemAutoWidth = false;
    settings.Width = System.Web.UI.WebControls.Unit.Percentage(100);
    settings.Styles.Style.Border.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(0);
    settings.Styles.Style.BorderTop.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(1);
    settings.Items.Add(item =>
    {
        item.Name = "btnSubmit";
        item.Text = "生成";
        item.Image.Url = Url.Content("~/Content/ControlImages/save_add.png");
    });
    settings.Items.Add(item =>
    {
        item.Name = "btnback";
        item.Text = "返回";
        item.Image.Url = Url.Content("~/Content/ControlImages/back.png");
    });

    settings.ClientSideEvents.ItemClick = "function(source,e){MenuTop_emClick(source,e)}";
    settings.ItemLinkMode = ItemLinkMode.ContentBounds;
}).GetHtml()

<table  width="100%" style=" height:30px" class="tableForm">
<tr>
<td class="tdClass" align="right">
资金性质:
</td>
<td class="tdClass" align="left">
 @Html.DevExpress().ComboBox(settings =>
               {
                   settings.Name = "FFinancePropNo";
                   settings.Properties.DropDownStyle = DropDownStyle.DropDownList;
                   settings.Width = System.Web.UI.WebControls.Unit.Pixel(150);
                   settings.Properties.TextField = "FFinancePropShortName";
                   settings.Properties.ValueField = "FFinancePropNo";
                   settings.Properties.EnableClientSideAPI = true;
                   settings.Properties.ClientSideEvents.ValueChanged = "ValueChanged";
               }).BindList(ViewData["FinancePropList"]).GetHtml()
</td>
</tr>
</table>
        @Html.Partial("SelectIssuePartial", Model)
        @Html.Hidden("hidIssueIDList", "")
        @Html.Hidden("hidFFinancePropNo", "")

    }
    <script>
        lp.Hide();
    </script>
</body>
</html>
